credits: coding: Eric Schaefer gfx: giger03: H.R.Giger (found it on ftp://ftp.uni-stuttgart.de) O3dfx: stole it from the Operation-3Dfx web page Well, actually, I wanted to do a lot more, but it's exams time and I don't have very much sparetime. If you are a real optimizations crack, don't look at the source codes (trust me :-). I'm using c-lib sin() and cos() in the inner loop and did not optimize a bit... It still runs very smooth on my i586mmx/166 (overclocked to 187), Diamond Monster 3D and NT/W95. I also tested it with 2nd level cache disabled and it did still run smooth. tech: I am using a set of vertices (the basic shape of the tunnel) to generate the tunnel at runtime. When a segment gets out of sight (behind you), it gets appended at the end to make the tunnel infinite. Since the coordinate space is limited, it starts at the beginning, when it reaches the end of a period (of sine/cosine). The twist is done using a sine function for up/down movement and a cosine for left/right (same amplitude and frequency/period). The 3Dfx-chip uses color/texture-settings for vertices, not faces. That's why I redefine texture settings for each face, since the vertices are shared among several faces. The most easy thing is the fog: Set fog color, set fog mode (ITERATED_ALPHA), apply good values to the alpha component depending on the z-value of a vertex -> nice little fog/haze. I hope this screensaver encourages you to try it yourself: code a 3Dfx demo or even a game. It's not that hard at all. If you already got some 3D experience, it should be very easy to you... Eric Schaefer Schevenstr. 45 01326 Dresden Germany es5@inf.tu-dresden.de http://www.inf.tu-dresden.de/~es5